#include <iostream>
#include "geometry.h"

int main()
{
   int n = 0, m = 0;
   Point p;
   std::cin >> n;
   Polygon polygon(n);
   for (int i = 0; i < n; i++)
   {
      Point t;
      std::cin >> t;
      polygon.add_point(i, t);
   }

   std::cin >> m;
   for (int i = 0; i < m; i++) 
   {
      std::cin >> p;
      std::cout << (polygon.contains(p) ? "YES": "NO") << "\n";
   }
   return 0;
}